<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>操作日志表</title>
    <jsp:include page="/WEB-INF/view/commons/css.jsp" />
</head>
<body >
<div id="main-container" class="container-fluid">
    <form  action="logUserAccess/${action eq "create" ?"save":"update"}" name="inputForm" id="inputForm" method="post" class="form-horizontal">
    <input name="id" id="id" value="${entity.id}" type="hidden" />
    <div class="form-group">
        <label class="col-sm-1 control-label">线程标识：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="threadToken" value="${entity.threadToken}" placeholder="线程标识">
        </div>
        <label class="col-sm-1 control-label">子系统编码：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="subsysCode" value="${entity.subsysCode}" placeholder="子系统编码">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">模块名：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="moduleName" value="${entity.moduleName}" placeholder="模块名">
        </div>
        <label class="col-sm-1 control-label">方法名：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="methodName" value="${entity.methodName}" placeholder="方法名">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">访问地址：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="requestUrl" value="${entity.requestUrl}" placeholder="访问地址">
        </div>
        <label class="col-sm-1 control-label">用户代理：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="userAgent" value="${entity.userAgent}" placeholder="用户代理">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">请求方式：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="requestMethod" value="${entity.requestMethod}" placeholder="请求方式">
        </div>
        <label class="col-sm-1 control-label">用户IP：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="userIp" value="${entity.userIp}" placeholder="用户IP">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">开始时间戳：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="accessStartTime" value="${entity.accessStartTime}" placeholder="开始时间戳">
        </div>
        <label class="col-sm-1 control-label">结束时间戳：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="accessEndTime" value="${entity.accessEndTime}" placeholder="结束时间戳">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">执行时间：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="executeTime" value="${entity.executeTime}" placeholder="执行时间">
        </div>
        <label class="col-sm-1 control-label">SESSIONID：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="sessionid" value="${entity.sessionid}" placeholder="SESSIONID">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-1 control-label">用户ID：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="userId" value="${entity.userId}" placeholder="用户ID">
        </div>
        <label class="col-sm-1 control-label">用户名：</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="userName" value="${entity.userName}" placeholder="用户名">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-1 col-sm-2">
            <button id="saveBtn" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-floppy-o"></i> 提交</button>
            <button type="button" class="btn btn-sm link_close"><i class="fa fa-close"></i> 关闭</button>
        </div>
    </div>
    </form>
</div><!--/#main-container-->

<!-- script start -->
<jsp:include page="/WEB-INF/view/commons/js.jsp" />
<script type="text/javascript">
    $(document).ready(function(e) {
        var options = {
            rules:{
                threadToken : { required : true, maxlength : 255 },
                subsysCode : { required : true, maxlength : 255 },
                moduleName : { required : true, maxlength : 255 },
                methodName : { required : true, maxlength : 255 },
                requestUrl : { required : true, maxlength : 500 },
                userAgent : { required : true, maxlength : 255 },
                requestMethod : { required : true, maxlength : 255 },
                userIp : { required : true, maxlength : 255 },
                accessStartTime : { required : true, digits : true  },
                accessEndTime : { required : true, digits : true  },
                executeTime : { required : true, digits : true  },
                sessionid : { required : true, maxlength : 255 },
                userId : { required : true, digits : true  },
                userName : { required : true, maxlength : 255 }
            },
            submitHandler:function(form){
                $(form).ajaxSubmit({
                    type:'post',
                    dataType:'json',
                    success:function(data){
                        if(data.success){
                            $('#searchBtn', parent.document).click();
                            closeIframe();
                        }else{
                            layer.alert(data.msg);
                        }
                    }
                });
            }
        };
        $("#inputForm").validate(options);
    });
</script>
<!-- script end -->
</body>
</html>
